﻿<!DOCTYPE html>
<html lang="zh-CN" ng-app="taoqiApp">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    <meta name="description" content="天然气行业第三方交易平台">
    <meta name="keywords" content="517淘气网，天然气交易平台，天然气物流，天然气行情">
    <title>地图展示</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/site.css" rel="stylesheet">
    <script src="js/jquery.min.js"></script>

    <style>
        .layui-layer-dialog .layui-layer-content{
            padding-top:22px !important;
        }
    </style>
    <!--[if lt IE 9]>
      <script src="js/html5shiv.min.js" defer async="async"></script>
      <script src="js/respond.min.js" defer async="async"></script>
    <![endif]-->
</head>

<body ng-controller="baseController" ng-init="InitByCookie()">
    <div id="placeHolderHeader" ng-include src="headerHtml"></div>
    <div class="container" ng-controller="carController" ng-init="getCarInfo()">
        <div id="divPosition" style="display: none;padding:5px;float:right;">
            <input type="text" readonly="readonly" id="txtPosition" style="padding:5px;" />
        </div>

        <div class="editStyle1">
            <div class="title" style="display: inline-block;">
                地图查看
            </div>

            <a href="javascript:history.back();" class="mapBack title">
                退出地图
            </a>
            <div class="editForm1" style="padding:5px;">
                <div id="allmap"></div>
            </div>
        </div>

        <div id="car" style="width:260px;height:220px;border:1px solid gray;background-color:white;visibility:hidden;">
            <h4 style="margin-top:15px;margin-left:20px;margin-bottom:15px;">车辆实时位置</h4>
            <div><label style="margin:0px 5px 10px 20px;text-align:right;width:90px;">车牌号：</label><label>{{CarInfo.C_PlateNumber}}</label></div>
            <div><label style="margin:0px 5px 10px 20px;text-align:right;width:90px;">罐容：</label><label>{{CarInfo.C_Tonnage | number:2}}（立方米）</label></div>
            <div><label style="margin:0px 5px 10px 20px;text-align:right;width:90px;">驾驶员：</label><label>{{CarInfo.C_Driver}}</label></div>
            <div><label style="margin:0px 5px 10px 20px;text-align:right;width:90px;">驾驶员手机：</label><label>{{CarInfo.C_Tel}}</label></div>
            <div><label style="margin:0px 5px 10px 20px;text-align:right;width:90px;">押运员：</label><label>{{CarInfo.C_Driver2}}</label></div>
            <div><label style="margin:0px 5px 10px 20px;text-align:right;width:90px;">押运员手机：</label><label>{{CarInfo.C_Tel2}}</label></div>
        </div>
    </div>

    <div id="placeHolderFooter" ng-include src="footerHtml"></div>

    <script src="js/bootstrap.min.js" defer async="async"></script>
    <script src="js/angular.min.js"></script>
    <script src="js/angular-cookies.min.js"></script>
    <script src="js/angular-sanitize.min.js"></script>
    <script src="js/layer/layer.js"></script>
    <script src="js/site.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=wCp9mFd1bab0ygEVLnhdXAY7"></script>
    <script type="text/javascript" src="js/map.js"></script>
</body>
</html>

<script type="text/javascript">
    // 百度地图API功能
    //var map = new BMap.Map("allmap");
    //map.centerAndZoom('南京', 11);
    //map.enableScrollWheelZoom(true);

    function CarControl() {
        this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT;
        this.defaultOffset = new BMap.Size(10, 10);
    }

    CarControl.prototype = new BMap.Control();

    CarControl.prototype.initialize = function (map) {
        var div = document.getElementById("car");
        div.style.visibility = 'visible';

        // 添加DOM元素到地图中
        map.getContainer().appendChild(div);
        // 将DOM元素返回
        return div;
    }
    // 创建控件
    var carInfo = new CarControl();
    // 添加到地图当中
    map.addControl(carInfo);

    var id = getQueryString('id');
</script>